<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Homepage</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/web.css" type="text/css" media="screen, projection"/>
</head>

<body>
<div class="container">
	<%@include file="common/header.jsp" %>
	<br/>
	<br/>
	<div style="float: left">
	<%@include file="common/sidebar_category.jsp" %>
	</div>
</div>
	
  	
	<p><a href="<c:url value='/home' />">Home</a> > <a href=" <c:url value="/home/${category.id}"/>" ><c:out value="${category.name}"/></a> </p>
	<div style="text-align: center; float: left">
	<table width="900px" border="1" cellpadding="2" cellspacing="0">
		<c:forEach items="${products}" var="product">
		<tr>
			<td><img src="<c:url value="/images/${product.img1}"/>" /></td>
			<td><p><c:out value="${product.name}"/></p> 
				<p><c:out value="${product.fulldescription}"/></p>
			</td>          
			<td><p><c:out value="${product.price}"/></p>
				<input type="button" value="Add Cart" onclick="location.href='shoppingcart/${product.id}'"/>
				<a href="<c:url value="/product-detail/${product.id}"/>">View</a> 
			</td>
		</tr>
		</c:forEach>
	</table>
	</div>
	
	<div style="clear: both">
	<div class="footer">
	<%@include file="common/footer.jsp" %>
	</div>
	</div>
	
</body>

</html>